<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>v-on</title>
</head>
<body>
    <div id="app">
       <button @click="add">增加</button>
       <button v-on:click.prevent="dce">减少</button>
        <button onclick="ttt">jjj</button>
        {{num}}
    </div>
</body>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    let vm = new Vue({
        el:"#app",
        data:{
            num:18
        },
        methods:{
           add(){
               this.num++;
           },
            dce(){
               this.num--;
           }
        }
    })
    function ttt() {
        alert("jjji")
    }
</script>
</html>